package monopoli.communication;


import java.io.Serializable;
import java.util.Random;

/**
 *
 * @author Marco
 */

public class RMIAddress implements Serializable {

    static final long serialVersionUID = 5216435025451L;

    //Attributes
    private String ip;
    private int    port;
    private String bindName;

    
    //Constructor
    public RMIAddress(String ip, int port, String prefixBindName) {
        this.ip = ip;
        this.port = port;
        this.bindName = prefixBindName + String.valueOf(new Random().nextInt(10000));
    }

    //Public Methods
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getBindName() {
        return bindName;
    }

    public void setBindName(String prefixBindName) {
        this.bindName = prefixBindName + String.valueOf(new Random().nextInt(10000));
    }
}
